#include "brt.h"
#include "pwm.h"


static const long brt::cHachage=100000; // Frequence de hachage en Hz



brt::brt(int ch_freq, int ch_vol) : _pwm_frequence(ch_freq), _pwm_volume(ch_vol)
{
  write(0,0);  
}

void brt::write(unsigned long freq, unsigned int volume)
{
	unsigned char duty5, duty7, freq7;
	pwm_write(_pwm_frequence, freq ,50 );
	pwm_write(_pwm_volume, brt::cHachage ,volume);	
}
